/* 基础样式 */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
}

h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: 2.5em;
    padding: 20px 0;
}

/* 导航链接样式 */
a {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white !important;
    text-decoration: none;
    border-radius: 30px;
    margin: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-weight: bold;
}

a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #45a049, #4CAF50);
}

/* 搜索表单样式 */
form:not(.book-form) {
    margin: 20px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 600px;
}

input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 300px;
    margin-right: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

input[type="submit"] {
    padding: 12px 25px;
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

input[type="submit"]:hover {
    background: linear-gradient(45deg, #1976D2, #2196F3);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* 图书表单样式 */
.book-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    margin: 20px auto;
    max-width: 600px;
    text-align: left;
}

.book-form input[type="text"],
.book-form textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.book-form input[type="text"]:focus,
.book-form textarea:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
}

.book-form textarea {
    resize: vertical;
    min-height: 100px;
}

.book-form input[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

/* 图书表格样式 */
.tb-book {
    width: 98%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px auto;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 15px;
    overflow: hidden;
}

.tb-book th {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.tb-book td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.tb-book tr:last-child td {
    border-bottom: none;
}

.tb-book tr:hover {
    background-color: #f0f8ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.tb-book tr:nth-child(even) {
    background-color: #f9f9f9;
}

.tb-book tr:nth-child(even):hover {
    background-color: #e6f3ff;
}

/* 操作按钮样式 */
.tb-book td a {
    padding: 6px 12px;
    font-size: 14px;
    margin: 0 3px;
    border-radius: 15px;
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

.tb-book td a:hover {
    background: linear-gradient(45deg, #F57C00, #FF9800);
    transform: none;
}

/* 居中容器 */
center {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
